package com.company.project.modular.system.service.impl;

import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import com.company.project.modular.system.service.IUseService;
import com.company.project.modular.system.dao.UseMapper;
import com.company.project.modular.system.model.Use;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author lsf
 * @since 2018-10-30
 */
@Service
public class UseServiceImpl extends ServiceImpl<UseMapper, Use> implements IUseService {

    @Override
    public  Use selectByUseCode(@Param("useCode") String useCode){
        return this.baseMapper.selectByUseCode(useCode);
    }
    /*根据标识码，use_state=0查询id，并且根据id排序，选择第一个id存入到实验对照的useId里面*/
    @Override
    public List<String> findById(@Param("testCode") String testCode) {
        return this.baseMapper.findById(testCode);
    }

    /*根据标识码去查use_state=0*/
    @Override
    public List<String> findByState(@Param("testCode") String testCode) {
        return this.baseMapper.findByState(testCode);
    }


}
